<!-- IF B_COUNTDOWN -->
<script type="text/javascript">
	$(document).ready(
			function() {
				var currenttime = '{ENDS_IN}';
				function padlength(what) {
					var output = (what.toString().length == 1) ? '0' + what
							: what;
					return output;
				}
				function displaytime() {
					currenttime -= 1;
					if (currenttime > 0) {
						var hours = Math.floor(currenttime / 3600);
						var mins = Math
								.floor((currenttime - (hours * 3600)) / 60);
						var secs = Math.floor(currenttime - (hours * 3600)
								- (mins * 60));
						var timestring = padlength(hours) + ':'
								+ padlength(mins) + ':' + padlength(secs);
						$("#ending_counter").html(timestring);
						setTimeout(displaytime, 1000);
					} else {
						$("#ending_counter").html(
								'<span class="errfont">{L_911}</span>');
					}
				}
				setTimeout(displaytime, 1000);
			});
</script>
<!-- ENDIF -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td><b>{L_041}:</b> {TOPCATSPATH}</td>
		</tr>
		<tr>
			<td>
								
			</td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0" cellpadding="0" cellspacing="5px">
					<tbody>
						<tr>
							<td width="700px" valign="top">
								<h1 class="titTable4">{TITLE}</h1>
								<!-- IF SUBTITLE ne '' -->
								{SUBTITLE}
								<!-- ENDIF -->
								<!-- IF B_USERBID -->
								<div class="{YOURBIDCLASS}">{YOURBIDMSG}</div>
								<!-- ENDIF -->

								<div class="listbox">
									<!-- IF B_HASGALELRY -->
									<script type="text/javascript" src="{INCURL}js/fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
									<script type="text/javascript" src="{INCURL}js/fancybox/jquery.fancybox.pack.js"></script>
									<div style="float: left; width: 100%; display: block;">
										<!-- BEGIN gallery -->
										<a rel="pic_group" href="{SITEURL}{UPLOADEDPATH}{ID}/{gallery.V}" class="img_box"><img alt="" src="{SITEURL}getthumb.php?w={THUMBWIDTH}&fromfile={UPLOADEDPATH}{ID}/{gallery.V}" /></a>
										<!-- END gallery -->
									</div>
									<!-- ENDIF -->
									<!-- IF CONTAINS_MAP -->
									<table style="height: 400px; width: 100%" border="0px">
										<tr>
											<td>
												<div class="main-map-style">
												<div id="map_canvas" style="border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px;"></div>
												</div>
											</td>
										</tr>
									</table>
									<!-- ENDIF -->
									<div class="view_item_block">
										<!-- BEGIN attrs -->
										<div class="attr_box">
										<i>{attrs.NAME}:</i><br>
										<b>{attrs.ATTR_VAL}</b>
										</div>
										<!-- END attrs -->
									</div>
									<br>
									<div class="view_item_block">
										{AUCTION_DESCRIPTION}
									</div>
									<hr>
									<div class="titTable3">
										{VIEW_HISTORY1} <!-- a href="{SITEURL}friend.php?id={ID}">{L_106}</a -->
										<!-- IF B_CANCONTACTSELLER -->
										<a style="color: red;" href="{SITEURL}send_email.php?auction_id={ID}">{L_922}</a> |
										<!-- ENDIF -->
										<!-- IF B_LOGGED_IN -->
										<a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
										<!-- ELSE -->
										<a href="{SITEURL}user_login.php?">{L_5202}</a>
										<!-- ENDIF -->
										<script type="text/javascript" src="//yandex.st/share/share.js"
										charset="utf-8"></script>
										<div class="yashare-auto-init" data-yashareL10n="ru"
										 data-yashareType="none" data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir,gplus"

										></div>										
									</div>
									
									
									<!-- IF B_SHOWHISTORY -->
									<div class="tableContent2">
										<div class="titTable4">{L_26_0001}</div>
										<div class="table2">
											<a name="history"></a>
											<table width="100%" border="0" cellpadding="4" cellspacing="1">
												<tr>
													<th width="33%" align="center">{L_176}</th>
													<th width="33%" align="center">{L_130}</th>
													<th width="33%" align="center">{L_175}</th>
													<!-- IF ATYPE eq 2 -->
													<th width="33%" align="center">{L_284}</th>
													<!-- ENDIF -->
												</tr>
												<!-- BEGIN bidhistory -->
												<tr valign="top"{bidhistory.BGCOLOUR}>
													<td>
														<!-- IF B_BIDDERPRIV --> {bidhistory.NAME} <!-- ELSE --> <a
														href="{SITEURL}profile.php?user_id={bidhistory.ID}">{bidhistory.NAME}</a>
														<!-- ENDIF -->
													</td>
													<td align="center">{bidhistory.BID}</td>
													<td align="center">{bidhistory.WHEN}</td>
													<!-- IF ATYPE eq 2 -->
													<td align="center">{bidhistory.QTY}</td>
													<!-- ENDIF -->
												</tr>
												<!-- END bidhistory -->
											</table>
										</div>
									</div>
									<!-- ENDIF -->								
									<!-- IF B_HAS_QUESTIONS -->
									<div class="tableContent2">
										<div class="titTable4">
											<a name="questions"></a>{L_552}
										</div>
										<div class="table2">
											<!-- BEGIN questions -->
											<b>{L_5239}</b>
											<div class="smallspan padding">
												<!-- BEGIN conv -->
												<p>
													<b>{questions.conv.BY_WHO}</b>: {questions.conv.MESSAGE}
												</p>
												<!-- END conv -->
											</div>
											<!-- END questions -->
										</div>
									</div>
									<!-- ENDIF -->
									
								</div>
								<script type="text/javascript"><!--
								google_ad_client = "ca-pub-5280940507804127";
								/* main_page */
								google_ad_slot = "8156045491";
								google_ad_width = 728;
								google_ad_height = 90;
								//-->
								</script>
								<script type="text/javascript"
								src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
								</script>								
							</td>
							<td valign="top">
								<!-- IF B_NOTBNONLY -->
								<h2 class="titTable1">
									{L_116}
								</h2>
								<div class="listbox">
										<p style="font-size: 1.9em; color: rgb(255, 0, 0); text-align: center;">{MAXBID}</p>
										<!-- IF B_HASRESERVE -->
										<center><span class="smallspan">{L_514}</span></center>
										<!-- ENDIF -->
										<!-- IF B_BUY_NOW -->
										<center><i><a href="buy_now.php?id={ID}" style="color: #6DC0FC;">{L_496}<br>{BUYNOW2}</a></i></center>
										<!-- ENDIF -->

								</div>
								<!-- ELSE -->
								
								<div class="listbox">
									<p style="font-size: 1.9em; color: rgb(255, 0, 0); text-align: center;">{BUYNOW2}</p> 
									<!-- IF LOGGED_IN and B_HASENDED eq false and B_CAN_BUY -->
									<center>
										<a href="{BIDURL}buy_now.php?id={ID}">
											<img border="0" align="absbottom" alt="{L_496}" src="{BNIMG}">
										</a>
									</center>
									<!-- ENDIF -->
								</div>
								
								<!-- ENDIF -->
								
								<!-- IF LOGGED_IN -->
								<!-- IF B_HASENDED eq false and B_CAN_BUY -->
								<!-- IF B_NOTBNONLY -->
									<div class="listbox">
										<table width="100%" border=0 cellpadding=2 cellspacing=0 border=1>
											<form name="bid" action="{BIDURL}bid.php" method="post">
												<tr>
													<td width="65%">
														<table width=100% border=0 cellpadding=2 cellspacing=0>
															<tr>
																<td align="left">
																	<b> 
																		<!-- IF QTY gt 1 --> 
																		{L_284}: <input type="text" name="qty" size=15 /> <span class="smallspan">{QTY} {L_5408}</span><br>
																		<!-- ENDIF --> 
																		{L_121} <input type="text" name="bid" size="15"> 
																		<!-- IF ATYPE eq 1 --> 
																			<span class="smallspan">{L_124}<br>{NEXTBID}</span><br> 
																		<!-- ENDIF -->
																	</b>
																</td>
															</tr>
														</table>
													</td>
													<td valign='center' align='center' class='tema' width="50%">
														<input type="hidden" name="seller_id" value="{SELLER_ID}">
														<input type="hidden" name="title" value="{TITLE}"> 
														<input type="hidden" name="category" value="{CAT_ID}"> 
														<input type="hidden" name="id" value="{ID}"> 
														<input type="hidden" name="csrftoken" value="{_CSRFTOKEN}">
														<label for="place_bit_btn">
															<div class="bid_pic_style">
																<input type="submit" name="" value="" class="search_button_style" id="place_bit_btn">
															</div>
														</label>
													</td>
												</tr>
											</form>
										</table>
									</div>
								<!-- ELSE -->
								<!-- ENDIF -->
								<!-- ENDIF -->
								<!-- ELSE -->
								<div class="listbox">
									<center><a href="{SSLURL}user_login.php?" style="color: red;">{L_77_0022}</a></center>
								</div>
								<!-- ENDIF -->
							
							
								<h2 class="titTable1">
									{L_77_0016}
								</h2>
								<div class="listbox">
									<table border='0' width="100%" cellspacing="0"
										cellpadding="0">
										<tr>
											<td width="50%" align="left">{L_611}:</td>
											<td align="left">{AUCTION_VIEWS}</td>
										</tr>
	
										<!-- auction type -->
										<tr>
											<td width="50%" align="left">{L_261}:</td>
											<td align="left">{AUCTION_TYPE}</td>
										</tr>
										<!-- higher bidder -->
										<!-- IF B_HASBUYER -->
										<tr>
											<td width='50%' style="" valign="top">{L_117}:</td>
											<td>
												<!-- BEGIN high_bidders -->
												<p>
													<!-- IF B_BIDDERPRIV -->
													<b>{high_bidders.BUYER_NAME}</b>
													<!-- ELSE -->
													<a
														href="{SITEURL}profile.php?user_id={high_bidders.BUYER_ID}&auction_id={ID}"><b>{high_bidders.BUYER_NAME}</b></a>
													<b>(<a
														href="{SITEURL}feedback.php?id={high_bidders.BUYER_ID}&faction=show">{high_bidders.BUYER_FB}</a>)
													</b>
													<!-- ENDIF -->
													{high_bidders.BUYER_FB_ICON}
												</p> <!-- END high_bidders -->
											</td>
										</tr>
										<!-- ENDIF -->
										<!-- IF QTY gt 1 -->
										<tr>
											<td width="50%" align="left">{L_901}:</td>
											<td align="left">{QTY}</td>
										</tr>
										<!-- ENDIF -->
										<tr>
											<td width="50%" align="left">{L_77_0027}:</td>
											<td align="left">{REGION}</td>
										</tr>
										<tr>
											<td width="50%" align="left">{L_118}:</td>
											<td align="left" valign="top">
												<!-- IF B_COUNTDOWN --> <span id="ending_counter">{ENDS}</span>
												<!-- ELSE --> {ENDS}<!-- IF B_SHOWENDTIME -->
												<br>
											<span class="smallspan">({ENDTIME})</span>
											<!-- ENDIF --> <!-- ENDIF -->
											</td>
										</tr>
										<!-- IF B_NOTBNONLY -->
										<tr>
											<td width="50%" align="left">{L_119}:</td>
											<td align="left">{NUMBIDS} {VIEW_HISTORY2}</td>
										</tr>
										<!-- IF ATYPE eq 2 -->
										<tr>
											<td width="50%" align="left">{L_038}:</td>
											<td align="left">{MINBID}</td>
										</tr>
										<!-- ENDIF -->
										<!-- ENDIF -->
										<tr>
											<td width="50%" align="left">{L_023}:</td>
											<td align="left">{SHIPPING_COST}</td>
										</tr>
										<!-- IF B_HASENDED -->
										<tr>
											<td colspan="2" align="left"><b>{L_904}</b></td>
										</tr>
										<!-- ENDIF -->
									</table>
								</div>
								<h2 class="titTable1">
									{L_77_0017}
								</h2>
								<div class="listbox">
									<table width="100%" cellspacing="0" cellpadding="0" border="0">
										<tr>
											<td style="text-align: center;">
												<!-- IF AVATAR ne '' -->
												<a href='{SITEURL}profile.php?user_id={SELLER_ID}&auction_id={ID}'>
													<img src="{AVATAR}" border="0">
												</a>
												<!-- ELSE -->
												<a href='{SITEURL}profile.php?user_id={SELLER_ID}&auction_id={ID}'>
													<img src="{SITEURL}/uploaded/avatar/default.jpg" border="0">
												</a>
												<!-- ENDIF -->										
											</td>
										</tr>
										<tr>
											<td class="table2" style="padding: 10px;"><a
												href='{SITEURL}profile.php?user_id={SELLER_ID}&auction_id={ID}'><b>{SELLER_NICK}</b></a>
												(<a href='{SITEURL}feedback.php?id={SELLER_ID}&faction=show'>{SELLER_TOTALFB}</A>)
												{SELLER_FBICON}</td>
										</tr>
										<tr>
											<td width="97%">
												<li>{L_5509}{SELLER_NUMFB}{L__0151}
											<li><b>{L_5506}{SELLER_FBPOS}</b> <!-- IF SELLER_FBNEG ne 0 -->
											<li>{SELLER_FBNEG}</li> <!-- ENDIF -->
												<li>{L_5508}{SELLER_REG}</li>
											</td>
										</tr>
										<tr>
											<td width="97%"><a
												href="{SITEURL}active_auctions.php?user_id={SELLER_ID}">{L_213}</a>
												<br>
											<br></td>
										</tr>
									</table>
								</div>

								<h2 class="titTable1">
									{L_77_0018}
								</h2>
								<div class="listbox">
									<!-- IF COUNTRY ne '' or ZIP ne '' -->
									<b>{L_014}:</b><br> {COUNTRY} ({ZIP})<br>
									<!-- ENDIF -->
									<b>{L_025}:</b><br> {SHIPPING}, {INTERNATIONAL}<br>
									<!-- IF SHIPPINGTERMS ne '' -->
									<table border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td valign="top"><b>{L_25_0215}:</b>&nbsp;</td>
											<td valign="top">{SHIPPINGTERMS}</td>
										</tr>
									</table>
									<!-- ENDIF -->
									<br> <b>{L_026}:</b><br> {PAYMENTS}<br>
									<!-- IF ! B_BUY_NOW_ONLY -->
									<b>
										<!-- IF ATYPE eq 1 -->{L_127}<!-- ELSE -->{L_038}<!-- ENDIF -->:
									</b><br> {MINBID}<br>
									<!-- ENDIF -->
									<br> <b>{L_111}:</b><br> {STARTTIME}<br> <b>{L_112}:</b><br>
									{ENDTIME}<br> <b>{L_113}:</b> {ID}<br> <br> <b>{L_041}:</b><br>
									{CATSPATH}<br>
									<!-- IF SECCATSPATH ne '' -->
									<b>{L_814}:</b><br> {SECCATSPATH}
									<!-- ENDIF -->
								</div>
							
							
								<!-- IF B_CANEDIT -->
								<div class="listbox">
									<a href="{SITEURL}edit_active_auction.php?id={ID}" style="color: red; font-weight: bold;">{L_30_0069}</a>
								</div>
								<!-- ENDIF -->
							
							</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>
</table>